# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ksmtp
pkgver=20.04.3
pkgrel=0
pkgdesc="Job-based library to send email through an SMTP server"
arch="all !armhf"
url="https://kontact.kde.org"
license="LGPL-2.1-or-later"
depends_dev="qt5-qtbase-dev kcoreaddons-dev ki18n-dev kio-dev cyrus-sasl-dev"
makedepends="$depends_dev extra-cmake-modules"
source="https://download.kde.org/stable/release-service/$pkgver/src/ksmtp-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-lang"
options="!check" # Broken

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="c9794ca8dd93e25c79dd22fab38f71a421da1612658830ffe87cc8e751db9624a3d1924edd52d6fdaa97044e4d1accef5b6807f9461f857bedccc00f4d54f109  ksmtp-20.04.3.tar.xz"
